<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>

<html>
<head>
	<title>用户详情</title>
</head>

<body>	
	
	<div class="main-content-inner">
		<!-- #section:basics/content.breadcrumbs -->
			<script type="text/javascript">
				try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
			</script>
	
			<ul class="breadcrumb">
				<li>
					<i class="ace-icon fa fa-home home-icon"></i>
					<a href="${ctx}/welcome">主页</a>
				</li>
				<li class="active">用户详情</li>
			</ul><!-- /.breadcrumb -->

		<!-- /.nav-search -->


		<div class="page-content">
			
			<c:if test="${not empty message}">
				<div id="message" class="alert alert-success"><button data-dismiss="alert" class="close">×</button>${message}</div>
			</c:if>	
			
			<div class="page-header">
				<h1>
					用户个人信息 &nbsp;&nbsp;

				</h1>
				<c:if test="${customor.user.type eq '1'}">普通用户</c:if>
				<c:if test="${customor.user.type eq '0'}">后台管理人员</c:if>
				&nbsp;&nbsp;&nbsp;&nbsp;
				<c:if test="${customor.status eq '1'}">冻结</c:if>
				<c:if test="${customor.status eq '0' and customor.isJoin !='1'}">正常</c:if>
			</div><!-- /.page-header -->			
			
			<div class="row">
				<div class="col-xs-12">
					<h3>账号信息</h3>
					<table id="sample-table-1" class="table table-striped table-bordered table-hover">
						<tr>
							<td>用户姓名：${customor.user.name}</td>
							<td>登录名:   ${customor.user.loginName}</td>
						</tr>
						<tr>
							<td>注册时间:<fmt:formatDate value="${customor.user.registerDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
							<td>注册城市:${customor.shtCity.name}</td>
						</tr>
						<tr>
							<td>邀请类型:<c:if test="${customor.invitetype eq '0'}">无</c:if><c:if test="${customor.invitetype eq '1'}">邀请</c:if><c:if test="${customor.invitetype eq '2'}">地推</c:if></td>
							<td>注册邀请码:
                                <c:if test="${customor.invitetype eq '2'}">
                                     ${customor.user.code}
                                </c:if>
                                <c:if test="${customor.invitetype eq '1'}">
                                    ${customor.invitedcode}
                                </c:if>
                                <c:if test="${customor.invitetype eq '0'}">
                                    无
                                </c:if>
                            </td>
						</tr>
						<tr>
							<td>邀请用户数:${customor.invitenum}</td>
							<td>发布车辆数:${publishNum}</td>
						</tr>
						<tr>
							<td>拥有积分:${customor.integration}</td>
							<td>可用代金券:${triple.left}元</td>
						</tr>
					</table>
				</div>

				<div class="col-xs-12">
					<h3>代金券明细</h3>
					<table class="table table-striped table-bordered table-hover" style="width: 400px">
						<tr style="width: 300px">
							<td>
								累计领取代金券:${totalPrice} 元
								<span style="float:right;">
									&nbsp;&nbsp;&nbsp;&nbsp;<a class="btn btn-sm btn-info" href="${ctx}/couponsend/personRecord/${customor.id}?search_EQ_state=0">查看</a>
								</span>

							</td>
						</tr>
						<tr style="width: 300px">
							<td>
								累计使用代金券:${triple.middle}元
								<span style="float:right;">
							    	&nbsp;&nbsp;&nbsp;&nbsp;<a class="btn btn-sm btn-info" href="${ctx}/couponsend/personRecord/${customor.id}?search_EQ_state=3">查看</a>
								</span>
							</td>
						</tr>
						<tr style="width: 300px">
							<td>可用代金券:${triple.left}元
								<span style="float:right;">
									&nbsp;&nbsp;&nbsp;&nbsp;<a class="btn btn-sm btn-info" href="${ctx}/couponsend/personRecord/${customor.id}?search_EQ_state=1">查看</a>
								</span>
							</td>
						</tr>
						<tr style="width: 300px">
							<td>过期代金券:${triple.right}元
								<span style="float:right;">
									&nbsp;&nbsp;&nbsp;&nbsp;<a class="btn btn-sm btn-info" href="${ctx}/couponsend/personRecord/${customor.id}?search_EQ_state=4">查看</a>
								</span>
							</td>
						</tr>
					</table>
				</div>
                <div>
                    <a class="btn btn-md btn-info"   href="javascript:void(0);"  onclick="window.history.back();">返回</a> &nbsp;&nbsp; &nbsp;&nbsp;
                </div>
			</div>
		</div><!-- /.page-content -->

	</div>
	<script src="${ctx}/static/js/bootbox.min.js" type="text/javascript"></script>
	<script src="${ctx}/static/js/date-time/bootstrap-datepicker.js"></script>
</body>
</html>
